<?php

namespace server\impl;

use common\core\server\BaseServer;
use server\dao\SysLoginLog;
use server\dao\SysOperationLog;
use server\SystemLogInterface;

class SystemLogImpl extends BaseServer implements SystemLogInterface
{

    public $loginLog;
    public $operationLog;

    public function __construct(array $config = [])
    {
        $this->loginLog = new SysLoginLog();
        $this->operationLog = new SysOperationLog();
        parent::__construct($config);
    }

    /**
     * user login log
     *
     * @param array $params
     *
     * @return mixed
     * @throws
     */
    public function setUserLoginLog(array $params)
    {
        return $this->loginLog->setUserLoginLog($params);
    }

    /**
     * 操作日志
     *
     * @param array $params
     *
     * @return mixed
     * @throws
     */
    public function setOperationLog(array $params)
    {
        return $this->operationLog->setOperationLog($params);
    }

    /**
     * 获得 操作日志
     *
     * @param array $params
     *
     * @return mixed
     */
    public function getOperationLog(array $params)
    {
        return $this->operationLog->getOperationLog($params);
    }

    /**
     * 获得 登录日志
     *
     * @param array $params
     *
     * @return mixed
     */
    public function getLoginLog(array $params)
    {
        return $this->loginLog->getLoginLog($params);
    }

}
